<?php


// 搜索参数
$_GET['pid'] = empty($_GET['pid']) ? 0 : intval($_GET['pid']);
$_GET['depth'] = empty($_GET['depth']) ? 0 : 1;

$oLibrary = new Library();
$list = $oLibrary->get_library_list($_GET['pid'], 0, $_GET['depth']);
if(!empty($list)){
	foreach($list as $key => $row){
		$row['name'] = str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;', $row['level']).$row['name'];
		$row['addtime'] = ftime($row['addtime']);
		$row['updatetime'] = ftime($row['updatetime']);
		$list['list'][$key] = $row;
	}
	$vars['list'] = $list['list'];
	$vars['total'] = count($list);
}
?>